$title example lp

sets	i	/1*6/;
alias(i,j);

parameter	a(i,j)	Matrix of coefficients,
		b(i)	Matrix of coefficients,
		c(i)	Matrix of coefficients;

a(i,j) = round(uniform(1,10),0);
b(i) = round(uniform(1,8),0);
c(i) = round(uniform(1,12),0);

variables	Z	Objective,
		X(i);

equations	objdef, cons1(i);

objdef..	Z =e= sum(i, c(i)*X(i));

cons1(i)..	sum(j, a(i,j)*X(i)) =l= b(i);

model lin /all/;
solve lin using LP maximizing Z;
